<?php

namespace app\admin\validate;

use think\Validate;

class Orders extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'cancelReason' => 'require',
        'rejectionReason' => 'require',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '订单id必须',
        'cancelReason.require' => '取消原因必须',
        'rejectionReason.require' => '拒单原因必须',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'cancel' => ['id','cancelReason'],
        'rejection' => ['id','rejectionReason'],
        'accept' => ['id'],
        'delivery' => ['id'],
        'comp' => ['id'],
        'return' => ['id'],
    ];
    
}
